package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.DeviceDataPageReqDto;
import com.zzyl.service.DeviceDataService;
import com.zzyl.service.RoomService;
import com.zzyl.vo.DeviceDataVo;
import com.zzyl.vo.RoomVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/device-data")
@Api(tags = "管理端-设备想关的接口")
public class DeviceDataController {
    /**
     * @author ：zhangheng
     * @date ：Created in 2024/9/12 17:14
     * @description：设备物模型数据
     * @modified By：
     * @version: 1.0
     */
    @Autowired
    private DeviceDataService deviceDataService;

    @ApiOperation("分页查询")
    @GetMapping("/get-page")
    public ResponseResult<PageResponse<DeviceDataVo>> getDeviceDataPage(DeviceDataPageReqDto deviceDataPageReqDto) {
        PageResponse<DeviceDataVo> dataVoPageResponse = deviceDataService.selectByPage(deviceDataPageReqDto);
        return ResponseResult.success(dataVoPageResponse);
    }

}

